package cloud.ben.smallscalepigfarmmanagementsystem.entity.monitoring;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import javax.validation.constraints.NotNull;

/**
 * @Author: Ben
 * @Date: 2022/5/2 10:46
 */
@Data
@TableName("environmental_monitoring")
@ApiModel(description = "环境监控表")
@ToString
@NoArgsConstructor
public class EnvironmentalMonitoring {

    /**
     * 主键id
     */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(required = true,value = "id")
    private Integer id;

    /**
     * 温度
     */
    @ApiModelProperty(required = true,value = "温度")
    @NotNull(message = "温度为空")
    private String temperature;

    /**
     *湿度
     */
    @ApiModelProperty(required = true,value = "湿度")
    @NotNull(message = "湿度为空")
    private String humidity;

    /**
     * 氧气浓度
     */
    @ApiModelProperty(required = true,value = "氧气浓度")
    @NotNull(message = "氧气浓度为空")
    private String oxygenConcentration;

    /**
     * 二氧化碳浓度
     */
    @ApiModelProperty(required = true,value = "二氧化碳浓度")
    @NotNull(message = "二氧化碳浓度为空")
    private String cO2Concentration;

    public EnvironmentalMonitoring(Integer id, String temperature, String humidity, String oxygenConcentration, String cO2Concentration) {
        this.id = id;
        this.temperature = temperature;
        this.humidity = humidity;
        this.oxygenConcentration = oxygenConcentration;
        this.cO2Concentration = cO2Concentration;
    }

    public EnvironmentalMonitoring(String temperature, String humidity, String oxygenConcentration, String cO2Concentration) {
        this.temperature = temperature;
        this.humidity = humidity;
        this.oxygenConcentration = oxygenConcentration;
        this.cO2Concentration = cO2Concentration;
    }
}